﻿/* تأكد من أن الأزرار لا تلتصق على الشاشات الصغيرة */
@media (max-width: 576px) {
    .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .me-1 {
        margin-right: 0.25rem !important;
    }

    .mb-1 {
        margin-bottom: 0.25rem !important;
    }
}
/* ============================================ */
/* CSS لصفحة Ports Index مع البحث */
/* ملف: wwwroot/css/index port .css */
/* ============================================ */

/* تحسين المظهر العام */
.container {
    max-width: 1400px;
}

/* تحسين بطاقة البحث */
.card {
    border-radius: 10px;
    transition: all 0.3s ease;
}

    .card:hover {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    }

.card-header {
    border-radius: 10px 10px 0 0 !important;
    padding: 1rem 1.5rem;
}

/* تحسين حقول البحث */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

    .form-label i {
        color: #17a2b8;
        margin-left: 5px;
    }

.form-control,
.form-select {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    padding: 0.6rem 1rem;
}

    .form-control:focus,
    .form-select:focus {
        border-color: #17a2b8;
        box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.25);
    }

/* تحسين الأزرار */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border: none;
}

/* بطاقات الإحصائيات */
.card.border-primary,
.card.border-success,
.card.border-info {
    border-width: 2px;
    transition: all 0.3s ease;
}

    .card.border-primary:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
    }

    .card.border-success:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
    }

    .card.border-info:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(23, 162, 184, 0.3);
    }

/* تحسين الجدول */
.table-responsive {
    border-radius: 0 0 10px 10px;
}

.table {
    margin-bottom: 0;
}

    .table thead th {
        background: linear-gradient(135deg, #17b83a 0%, #139629 100%);
        color: white;
        font-weight: 600;
        border: none;
        padding: 1rem;
        vertical-align: middle;
    }

    .table tbody tr {
        transition: all 0.2s ease;
    }

        .table tbody tr:hover {
            background-color: #f8f9fa;
            transform: scale(1.01);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

    .table tbody td {
        padding: 1rem;
        vertical-align: middle;
    }

/* تحسين الـ badges */
.badge {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
}

    .badge.bg-primary {
        background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    }

    .badge.bg-success {
        background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
    }

    .badge.bg-info {
        background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
    }

/* تحسين مجموعة الأزرار */
.btn-group .btn {
    padding: 0.4rem 0.8rem;
    margin: 0;
}

    .btn-group .btn:not(:last-child) {
        border-left: 1px solid rgba(255, 255, 255, 0.3);
    }

.btn-sm {
    font-size: 0.875rem;
}

/* تحسين رسالة عدم وجود نتائج */
.alert-warning {
    border-radius: 10px;
    padding: 2rem;
    border: 2px solid #ffc107;
}

    .alert-warning i {
        color: #ffc107;
    }

/* تحسين العنوان الرئيسي */
h2.text-success {
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .d-flex.justify-content-between {
        flex-direction: column;
        align-items: stretch !important;
    }

    .btn-success.btn-sm {
        width: 100%;
        margin-top: 1rem;
    }

    .row.g-3 .col-md-4 {
        margin-bottom: 1rem;
    }

    .btn-group {
        flex-direction: column;
    }

        .btn-group .btn {
            width: 100%;
            margin-bottom: 0.25rem;
            border-left: none !important;
            border-radius: 8px !important;
        }

    .table {
        font-size: 0.85rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.7rem;
    }
}

/* تحسين الأيقونات */
.fas, .far, .fab {
    margin-left: 5px;
}

/* تأثيرات إضافية */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-in-out;
}

.table tbody tr {
    animation: fadeIn 0.3s ease-in-out;
}

/* تحسين Scrollbar */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #17a2b8;
    border-radius: 10px;
}

    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: #138496;
    }

/* تحسين عداد الصفوف */
.fw-bold {
    color: #495057;
    font-size: 1.1rem;
}

/* تحسين Header الجدول */
.card-header.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
}

/* Print Styles */
@media print {
    .card-header.bg-light,
    .btn,
    .btn-group {
        display: none !important;
    }

    .table {
        border: 1px solid #dee2e6;
    }
}